// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'PatrolWorkOrderId',
        footer: "Foots",
        cnName: '巡检工单',
        name: 'PatrolWorkOrder',
        newTabEdit: false,
        url: "/PatrolWorkOrder/",
        sortName: "PatrolWorkOrderId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"BillNo":"","BillName":"","WorkPriority":"","MaintainWorkTypeName":"","ProfessionalTypeName":"","IntendedExecutor":"","BillDate":""};
    const editFormOptions = [[{"title":"工单编号","field":"BillNo","type":"text"},
                               {"title":"工单名称","field":"BillName","type":"text"},
                               {"dataKey":"作业优先级","data":[],"title":"工作优先级","field":"WorkPriority","type":"select"},
                               {"title":"维护类型","field":"MaintainWorkTypeName","type":"text"}],
                              [{"title":"专业类型","field":"ProfessionalTypeName","type":"text"},
                               {"dataKey":"职员","data":[],"title":"预定执行人","field":"IntendedExecutor","type":"select"},
                               {"title":"单据日期","field":"BillDate","type":"date"}]];
    const searchFormFields = {"BillNo":"","BillName":"","MaintainWorkTypeName":""};
    const searchFormOptions = [[{"title":"工单编号","field":"BillNo","type":"like"},{"title":"工单名称","field":"BillName","type":"like"},{"title":"维护类型","field":"MaintainWorkTypeName","type":"like"}]];
    const columns = [{field:'PatrolWorkOrderId',title:'巡检工单标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BillNo',title:'工单编号',type:'string',link:true,width:110,align:'left'},
                       {field:'BillName',title:'工单名称',type:'string',width:110,align:'left'},
                       {field:'WorkPriority',title:'工作优先级',type:'int',bind:{ key:'作业优先级',data:[]},width:110,align:'left'},
                       {field:'MaintainWorkTypeId',title:'维护类型标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'MaintainWorkTypeName',title:'维护类型',type:'string',width:110,align:'left'},
                       {field:'ProfessionalTypeId',title:'专业类型标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'ProfessionalTypeName',title:'专业类型',type:'string',width:110,align:'left'},
                       {field:'IntendedExecutor',title:'预定执行人',type:'int',bind:{ key:'职员',data:[]},width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'BillDate',title:'单据日期',type:'datetime',width:110,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:110,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:110,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:120,align:'left'}];
    const detail =  {
                    cnName: '任务路线',
                    table: 'PatrolWorkOrderDetail',
                    columns: [{field:'PatrolWorkOrderDetailId',title:'巡检工单明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'PatrolWorkOrderId',title:'巡检工单标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'TaskSequence',title:'任务顺序',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'TaskName',title:'任务名称',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'DeviceId',title:'设备标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'DeviceNumber',title:'设备编码',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'DeviceName',title:'设备名称',type:'string',width:110,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'DeviceSpec',title:'规格型号',type:'string',width:110,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'DeviceSize',title:'尺寸',type:'string',width:110,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'DeviceClassfiyId',title:'设备分类',type:'int',bind:{ key:'设备分类级联',data:[]},width:110,readonly:true,edit:{type:'cascader'},align:'left'},
                       {field:'TaskStandardType',title:'任务标准类型',type:'int',bind:{ key:'任务标准类型',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'TaskStandardValue',title:'任务标准值',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'StandardValueUnit',title:'标准值单位',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'ActualValue',title:'实际值',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'ActualExecutor',title:'实际执行人',type:'int',bind:{ key:'职员',data:[]},width:80,edit:{type:'select'},align:'left'},
                       {field:'DefaultExecutor',title:'默认执行人',type:'int',bind:{ key:'职员',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'StandardWorkPeriod',title:'标准工期',type:'decimal',width:110,edit:{type:'decimal'},align:'left'},
                       {field:'WorkPeriodUnit',title:'工期单位',type:'int',bind:{ key:'工期单位',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'ActualWorkPeriod',title:'实际工期',type:'decimal',width:110,edit:{type:'decimal'},align:'left'}],
                    sortName: 'PatrolWorkOrderDetailId',
                    key: 'PatrolWorkOrderDetailId'
                                            };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}